﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Brain.Editor
{
    public partial class DatabaseListForm : Form
    {
        public DatabaseListForm()
        {
            InitializeComponent();

            if (Engine.Instance.EditorManager != null)
            {
                for (int i = 0; i < Engine.Instance.EditorManager.DatabaseManager.DatabaseTypes.Count; i++)
                {
                    Database database = Engine.Instance.EditorManager.DatabaseManager.Databases[i];

                    TabPage page = new TabPage(database.ToString());
                    page.Tag = database.ToString();
                    this.tabControl_System.TabPages.Add(page);

                    DatabaseList list = new DatabaseList(database);
                    page.Controls.Add(list);
                }
            }
        }
    }
}
